# We have had lots of config issues with SECRET_TOKEN to avoid this mess we are moving it to redis
#  if you feel strongly that it does not belong there use ENV['SECRET_TOKEN']
#
token = '89733d5209f52fce4cb9eafd052a22e4e3bf8357a487bf4b1cab47a1d1736fcca67b982fbc20c5645ba04cac933bbbcf9114d8604a22058496a0dcb111843fc4'#ENV['SECRET_TOKEN']
unless token
  token = $redis.get('SECRET_TOKEN')
  unless token && token.length == 128
    token = SecureRandom.hex(64)
    $redis.set('SECRET_TOKEN',token)
  end
end

Discourse::Application.config.secret_token = token
Discourse::Application.config.secret_key_base = token
